"""
    判断字符串是否是回文
"""

str = input("请输入一段字符串").lower()
# 存放字符串
str1 = ""
# 存放数字
str2 = ""
for i in str:
    # 提取数字
    if '0' <= i <= '9':
        if i not in str1:
            str1 += i
    # 提取字符串
    if 'a' <= i <= 'z':
        if i not in str2:
            str2 += i
print(str1)
print(str2)
if str[::-1] == str:
    print("回文数")
else:
    print("不是回文数")
